answer = document.querySelectorAll(".answer");
items = document.querySelectorAll(".item");
btns = document.querySelectorAll(".iconfont");
console.log(items);
btns.forEach((item, index) => {
  btns[index].addEventListener("click", () => {
    if (btns[index].classList.contains("icon-down")) {
      answer[index].style.display = "block";
      btns[index].classList.remove("icon-down");
      btns[index].classList.add("icon-close");
      items[index].style.background = "url('cover.png')";
      items[index].style.height = "150px";
      items[index].style.backgroundSize = "cover";
      items[index].style.color = "white";
    } else {
      answer[index].style.display = "none";
      btns[index].classList.add("icon-down");
      btns[index].classList.remove("icon-close");
      items[index].style.background = "none";
      items[index].style.height = "";
      items[index].style.color = "black";
    }
  });
});
